package com.ss.android.article.base.feature.detail2.picgroup;

import android.content.DialogInterface;

import com.ss.android.action.a.a.Comment;
import com.ss.android.article.base.feature.update.b.UpdateItemMgr;

final class e implements DialogInterface.OnClickListener {
    private final GalleryFragment b;
    private final Comment a;

    e(GalleryFragment arg1, Comment arg2) {
        this.b = arg1;
        this.a = arg2;

    }

    public final void onClick(DialogInterface arg7, int arg8) {
        GalleryFragment v0 = this.b;
        Comment v1 = this.a;
        if(v1 != null) {
            com.ss.android.article.base.feature.detail2.picgroup.a.a v2 = v0.i;
            if(v2 != null && v2.i != null) {
                if(v2.i.removeCommnet(v1.commentId)) {
                    v2.mNewDetailAdapter.addAllComment(v2.i.mArticleTabComments[0].commentWrapperList);
                    v2.mNewDetailAdapter.notifyDataSetChanged();
                    --v0.c.commentCount;
                    v0.b(v0.c);
                    v0.a(v0.i, v0.i.i);
                }

                UpdateItemMgr.getInstance(v0.getContext()).deleteComment(v1.commentId);
            }
        }
    }
}

